import { _decorator, Component, Node, ToggleContainer, Toggle } from 'cc';
import { MyEvent } from '../event/MyEvent';
const { ccclass, property } = _decorator;

@ccclass('ViewMenuComponent')
export class ViewMenuComponent extends Component {
    
    @property(ToggleContainer)
    toggles: ToggleContainer = null

    onToggle(t: Toggle): void {
        // const index = this.toggles.node.children.indexOf(t.node);
        // const e = new MyEvent("node_switchPage", true, index)
        // this.node.dispatchEvent(e)
    }
}

